
/**
 * @cat Misc
 * @name Renaissance.DapperDapp
 * @desc dapper application wrapper
 * @param {String} id dapper application identifier
 * @return {Object} object
 */
function Renaissance.DapperDapp(id) {
	this.id = id;
	this.requester = new Renaissance.JsonRequest('http://www.dapper.net/transform.php?dappName=' + escape(id) + '&transformer=JSON&extraArg_callbackFunctionWrapper={callback}');
}
/**
 * @cat Misc
 * @name Renaissance.DapperDapp.prototype.run
 * @desc run dapper application
 * @param {Function} callback callback function to handle the application * response
 * @param {String} url to which the dapper scrapper needs to be applied to
 * @param {Object} optional parameters parameters to pass to dapper
 */
Renaissance.DapperDapp.prototype.run = function (callback, url, parameters) {
	if (typeof(parameters) == 'undefined') {
		var parameters = {};
	}

	parameters['applyToUrl'] = url;

	return this.requester.request(function (data) {
		callback.call(callback, data.groups);
	}, parameters);
};
